home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / aligndistribute.h < prev    next >
Encoding:
C/C++ Source or Header  |  2009-02-07  |  3.2 KB  |  121 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. /***************************************************************************
  8.     begin                : June 2005
  9.     copyright            : (C) 2005 by Craig Bradney
  10.     email                : cbradney@zip.com.au
  11. ***************************************************************************/
  12.  
  13. /***************************************************************************
  14. *                                                                         *
  15. *   Scribus is free software; you can redistribute it and/or modify       *
  16. *   it under the terms of the GNU General Public License as published by  *
  17. *   the Free Software Foundation; either version 2 of the License, or     *
  18. *   (at your option) any later version.                                   *
  19. *                                                                         *
  20. ***************************************************************************/
  21.  
  22. #ifndef ALIGNDISTRIBUTEPALETTE_H
  23. #define ALIGNDISTRIBUTEPALETTE_H
  24.  
  25. #include "ui_aligndistribute.h"
  26.  
  27. #include <QVariant>
  28. #include <QPixmap>
  29. #include <QDialog>
  30. #include <QLabel>
  31. #include <QList>
  32.  
  33. class QEvent;
  34.  
  35. #include "scribusapi.h"
  36. #include "scribusview.h"
  37. #include "scrpalettebase.h"
  38.  
  39. class QSpacerItem;
  40. class QLabel;
  41. class QLineEdit;
  42. class QComboBox;
  43. class QToolButton;
  44. class ScrSpinBox;
  45.  
  46. class ScribusMainWindow;
  47. class ScribusDoc;
  48. class UndoManager;
  49. struct AlignObjs;
  50.  
  51.  
  52. /*! \brief Align/Distribute palette.
  53. */
  54. class SCRIBUS_API AlignDistributePalette : public ScrPaletteBase, Ui::AlignDistribute
  55. {
  56.     Q_OBJECT
  57.  
  58. public:
  59.     AlignDistributePalette( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 );
  60.     ~AlignDistributePalette();
  61.  
  62.     virtual void setDoc( ScribusDoc* newDoc );
  63.     void unitChange();
  64.     
  65.     virtual void changeEvent(QEvent *e);
  66.     
  67. public slots:
  68.     void setGuide(int, qreal);
  69.  
  70. protected:
  71.     ScribusView *currView;
  72.     
  73. protected slots:
  74.     virtual void languageChange();
  75.     
  76.     void alignLeftOut();
  77.     void alignRightOut();
  78.     void alignBottomIn();
  79.     void alignRightIn();
  80.     void alignBottomOut();
  81.     void alignCenterHor();
  82.     void alignLeftIn();
  83.     void alignCenterVer();
  84.     void alignTopOut();
  85.     void alignTopIn();
  86.     void distributeDistH(bool usingDistance=false);
  87.     void distributeDistValH();
  88.     void distributeDistAcrossPage();
  89.     void distributeDistAcrossMargins();
  90.     void distributeRight();
  91.     void distributeBottom();
  92.     void distributeCenterH();
  93.     void distributeDistV(bool usingDistance=false);
  94.     void distributeDistValV();
  95.     void distributeDistDownPage();
  96.     void distributeDistDownMargins();
  97.     void distributeLeft();
  98.     void distributeCenterV();
  99.     void distributeTop();
  100.     
  101.     void alignToChanged(int);
  102.  
  103. private:
  104.     void init();
  105.     UndoManager *undoManager;
  106.     ScribusDoc::AlignTo currAlignTo;
  107.     QList<AlignObjs> *alignObjects;
  108.     ScribusDoc *currDoc;
  109.     qreal unitRatio;
  110.     int guideDirection;
  111.     qreal guidePosition;
  112.     QString guideInfoText, guideInfoTextNone;
  113.     void enableGuideButtons();
  114.     
  115. signals:
  116.     void documentChanged();
  117.  
  118. };
  119.  
  120. #endif // ALIGNDISTRIBUTEPALETTE_H
  121.